<!-- $Id: category_list.htm 17019 2010-01-29 10:10:34Z liuhui $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}
<form method="post" action="" name="listForm">
<div class="list-div" id="listDiv">
{/if}

<table width="100%" cellspacing="1" cellpadding="2" id="list-table">
  <tr>
    <th>{$lang.inc_name}</th>
    <th>{$lang.inc_code}</th>
    <th>{$lang.level}</th>
    <th width="20%" nowrap>{$lang.handler}</th>
  </tr>
  {foreach from=$all_cat item=cat}
  <tr align="center">
    <td align="left" class="first-cell">{$cat.inc_name_level}<span onclick="listTable.edit(this, 'edit_cat_name', {$cat.inc_id})">{$cat.inc_name}</span></td>
    <td align="center"><span onclick="listTable.edit(this, 'edit_cat_code', {$cat.inc_id})">{$cat.inc_code}</span></td>
    <td align="center">{$cat.inc_level_name}</td>
    <td align="right" nowrap>
      {if $cat.level eq 'top' or $cat.level eq 'cat'}
      <a href="index_mgt.php?act=add_cat&parent_id={$cat.inc_id}">{$lang.add_cat}</a> |
      {/if}

      {if $cat.level eq 'cat'}
        <a href="index_mgt.php?act=add_detail&cat_id={$cat.inc_id}">{$lang.add_detail}</a> |
      {/if}

&nbsp;&nbsp;

      {if $cat.level eq 'top'}
        <a href="index_mgt.php?act=edit_top&cat_id={$cat.inc_id}">{$lang.edit}</a> |
      {else}
        <a href="index_mgt.php?act=edit_cat&cat_id={$cat.inc_id}">{$lang.edit}</a> |
      {/if}
      <a href="javascript:;" onclick="javascript: if(confirm('{$lang.drop_confirm}')){document.location.href='index_mgt.php?act=remove&amp;id={$cat.inc_id}'}" title="{$lang.remove}">{$lang.remove}</a>
&nbsp;&nbsp;
    </td>
  </tr>
  {foreachelse}
  <tr><td class="no-records" colspan="3">{$lang.no_records}</td></tr>
  {/foreach}
</table>

{if $full_page}
</div>
</form>

{literal}
<script language="JavaScript">
<!--


//-->
</script>
{/literal}

{include file="pagefooter.htm"}
{/if}